package com.cloud_notes.demo.common.exception;

import lombok.Data;

//自定义异常

@Data
public class CustomException extends RuntimeException{
    private int code;
    private String message;

    //无参构造
    public CustomException() {
    }

    //单参数构造
    public CustomException(int code) {
        this.code = code;
    }

    public CustomException(String message) {
        this.message = message;
    }

    //全参数构造
    public CustomException(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
